﻿
@using (Ajax.BeginForm("SendListPartialView", "Mail", Html.ViewContext.RouteData.Values, new AjaxOptions
    {
        HttpMethod = "POST",
        UpdateTargetId = "list-car",
        InsertionMode = System.Web.Mvc.Ajax.InsertionMode.Replace
    }))
    { 
        @UserQuery.CreateQuery(setting => {
       setting.QueryKey = QuerySettings.SendMailList;
       setting.Columns.Add(new QueryColumn() { Field = "note", Name = "内容" });
       setting.Columns.Add(new QueryColumn() { Field = "send_time", Name = "发送时间", DataType= TypeofQueryColumn.Date });
        })
}
<div id="list-car">
    @Html.Action("SendListPartialView")
</div>

<hr />



<table>
    <tr>
        <td>
             @Html.DevExpress().Button(settings =>
            {
                settings.Name = "btnAdd";
                settings.Text = "发送新公事";
                settings.Width = 120;
                settings.ControlStyle.CssClass = "button1";
                settings.ClientSideEvents.Click = "function(s, e){ location.href='" + @Url.Action("Edit", "Mail")+"' }";
            }).GetHtml()
        </td>
        <td style="color:red">提示：点击每行数据前的箭头可以查看回复。</td>
    </tr>
</table>
